﻿using Jayden.Dll.Core.Persistence;
using Jayden.Dll.Core.Persistence.Attributes;

namespace Jayden.Dll.Core.Membership
{
	[Table]
	public class UserRole : ObjectBase
	{
		public UserRole(UnitOfWork uow, string username, string rolename) : base(uow, username, rolename) { }
		public UserRole(UnitOfWork uow) : base(uow, string.Empty, string.Empty) { }

		[Field(PrimaryKey=true)]
		public string UserName { get { return (string)ObjectId[0]; } set { ObjectId[0] = value; } }
		[Field(PrimaryKey=true)]
		public string RoleName { get { return (string)ObjectId[1]; } set { ObjectId[1] = value; } }
	}
}
